C C -C Programming /C programming language MCQ Questions Set 5 Sample Test,Sample questions

Question:
 If the user did not supply the value, what value will it take?

1. default value

2.rise an error

3.both default value & rise an error

4.error


Question:
 What happens to a function defined inside a class without any complex operations (like looping, a large number of lines, etc)?

1.It becomes a virtual function of the class

2.It becomes a default calling function of the class

3.It becomes an inline function of the class

4.The program gives an error


Question:
 What is an inline function?

1.A function that is expanded at each call during execution

2.A function that is called during compile time

3.A function that is not checked for syntax errors

4. A function that is not checked for semantic analysis


Question:
By default how the value are passed in c++?

1. call by value

2.call by reference

3.call by pointer

4.call by object


Question:
From which function the execution of a C++ program starts?

1.start() function

2.main() function

3.new() function

4. end() function


Question:
If an argument from the parameter list of a function is defined constant then ______

1.It can be modified inside the function

2. It cannot be modified inside the function

3.Error occurs

4.Segmentation fault


Question:
If we start our function call with default arguments means, what will be proceeding arguments?

1.user argument

2.empty arguments

3.default arguments

4.user & empty arguments


Question:
How many minimum number of functions should be present in a C++ program for its execution?

1.0

2.1

3.2

4.3


Question:
What is the default return type of a function?

1. int

2.void

3.float

4.char


Question:
What we can’t place followed by the non-default arguments?

1.trailing arguments

2.default arguments

3.both trailing & default arguments

4. leading arguments


Question:
What will happen when we use void in argument passing?

1.It will not return value to its caller

2. It will return value to its caller

3.Maybe or may not be return any value to its caller

4.It will return value with help of object


Question:
When we define the default values for a function?

1.When a function is defined

2.When a function is declared

3.When the scope of the function is over

4. When a function is called


Question:
When will we use the function overloading?

1.same function name but different number of arguments

2.different function name but same number of arguments

3.same function name but same number of arguments

4.different function name but different number of arguments


Question:
Where can the default parameter be placed by the user?

1.leftmost

2.rightmost

3.both leftmost & rightmost

4.topmost


Question:
Where does the return statement returns the execution of the program?

1.main function

2.caller function

3.same function

4. block function


Question:
Where should default parameters appear in a function prototype?

1. To the rightmost side of the parameter list

2.To the leftmost side of the parameter list

3. Anywhere inside the parameter list

4.Middle of the parameter list


Question:
Which is used to keep the call by reference value as intact?

1.static

2.const

3.absolute

4.virtual


Question:
Which of the following feature is used in function overloading and function with default argument?

1.Encapsulation

2. Polymorphism

3.Abstraction

4.Modularity


Question:
Which of the following is important in a function?

1.Return type

2. Function name

3.Both return type and function name

4.The return type, function name and parameter list


Question:
Which of the following is the default return value of functions in C++?

1.int

2.char

3. float

4.void


Question:
Which value will it take when both user and default values are given?

1.user value

2.default value

3.custom value

4.defined value


More MCQS

  1. C++ Programming MCQS Set-1
  2. C++ Multiple Choice Questions Set-1
  3. C++ Multiple Choice Questions Set-2
  4. C++ Programming MCQS Set-2
  5. C++ Programming MCQS Set-3
  6. C++ Programming MCQS Set-4
  7. C++ (CPP) MCQ Question with Answer
  8. Advanced c++ multiple choice question(MCQS)
  9. OOPS Quiz Questions and Answers(MCQS)
  10. C Programming - MCQ Questions Set 1
  11. C Programming - MCQ Questions Set 2
  12. C Programming - MCQ Questions Set 3
  13. C Programming - MCQ Questions Set 4
  14. C Programming - MCQ Questions Set 5
  15. C++ programming language MCQ Questions Set 1
  16. C++ programming language MCQ Questions Set 2
  17. C++ programming language MCQ Questions Set 3
  18. C++ programming language MCQ Questions Set 4
  19. C++ programming language MCQ Questions Set 5
  20. C++ Programming -Constructors and Destructors
  21. C++ Programming -OOPS Concepts
  22. C++ Programming - References
  23. C++ Programming - Functions
  24. C MCQS:-The ABC of C
  25. C MCQS Interview Questions
  26. C++ Questions and Answers OOPs Basic Concepts
  27. C++ Questions and Answers Returning Objects
  28. C Programming MCQ Part 1
  29. C Programming MCQ
  30. Computer Science & Engineering C Multiple Choice Questions set 1
  31. Computer Science & Engineering C Multiple Choice Questions set 2
  32. C Multiple Choice Questions C Functions Set 1
  33. C Multiple Choice Questions C Functions Set 2
  34. C Multiple Choice Questions C Operators
  35. C Multiple Choice Questions & AnswersConditional Expressions
  36. C Multiple Choice Questions & Answers Data Types
  37. C Multiple Choice Questions & Answers File Access
  38. Computer Science & Engineering Cloud Computing MCQs Part 1
  39. CPP Programming MCQ Set 1
  40. CPP Programming MCQ Set 2
Search
Olete Team
Online Exam TestTop Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Testwebsite is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!